From: Sebastian Keller Date: Sat, 6 Feb 2021 23:23:04 +0000 (+0100) Subject: st/theme-node-drawing: Fix inner shadow fast path condition X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~452 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9e86cdbe71b4bf60e3a8d1d46b6f64a6dc5c0b10;p=gnome-shell.git st/theme-node-drawing: Fix inner shadow fast path condition We want to use the fast path of filling the entire area if either the left and right shadows would overlap or the top and bottom shadows. The latter check was wrong due to a typo resulting in the regular path being used in some cases it couldn't (and shouldn't) handle. This was causing the inset shadow used to highlight panel buttons to not appear for buttons above a certain width. Part-of: --- diff --git a/src/st/st-theme-node-drawing.c b/src/st/st-theme-node-drawing.c index 6c52da839..f839d990e 100644 --- a/src/st/st-theme-node-drawing.c +++ b/src/st/st-theme-node-drawing.c @@ -928,7 +928,7 @@ paint_inset_box_shadow_to_cairo_context (StThemeNode *node, shrunk_extents_x2 = extents_x2 + shadow_spec->xoffset - shadow_spec->spread; shrunk_extents_y2 = extents_y2 + shadow_spec->yoffset - shadow_spec->spread; - if (shrunk_extents_x1 >= shrunk_extents_x2 || shrunk_extents_y1 >= shrunk_extents_x2) + if (shrunk_extents_x1 >= shrunk_extents_x2 || shrunk_extents_y1 >= shrunk_extents_y2) { /* Shadow occupies entire area within border */ shadow_pattern = cairo_pattern_create_rgb (0., 0., 0.);